<!--获取新小孩-->
<script type="text/javascript">
	$(document).ready(function(){
		$("#new_kid_submit").click( function () {
			var args = new Object();
			args.sex = $('input:radio[name="sex"]:checked').val();
			args.name = $('input:text[name="kid_name"]').val();
			var data = ajax_call('kid', 'getNewKid', args, success_get_new_kid);
		});
	});
	function success_get_new_kid(ret) {
		var userinfo = Utils.getCookie("userinfo");
		userinfo.kid_num = 1;
		Utils.setCookie("userinfo", userinfo);
		display_msg('alert_msg1', '恭喜！', '恭喜你获得了一个'+ret.sex+'的小孩：'+ret.name);
		$("#main").load('userinfo.html');
	}
</script>
<div class="new_kid_form">
<header>你还没有小孩！要一个吧！</header>
	<input name='kid_name' type="text" required /> <br /><br />
	<input type="radio" name="sex" value="1" checked />男
	<input type="radio" name="sex" value="2" />女<br /><br />
	<input id='new_kid_submit' type="button" value="获取" />
</div>
